﻿using System;

namespace Microsoft.WowAddonStudio.FrameXml.Services
{
    public class ResourceFile
    {
        /// <summary>
        /// Gets or sets the path.
        /// </summary>
        /// <value>The path.</value>
        public string Path { get; private set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the resource file enum.
        /// </summary>
        /// <value>The resource file enum.</value>
        public ResourceFileType ResourceFileType { get; set; }


        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceFile"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        public ResourceFile(string path)
            : this(path, path, ResourceFileType.Undefined)
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceFile"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="resourceFileType">Type of the resource file.</param>
        public ResourceFile(string path, ResourceFileType resourceFileType) 
            : this(path, path, resourceFileType)
        {
            
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceFile"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="name"></param>
        /// <param name="resourceFileType">Type of the resource file.</param>
        public ResourceFile(string path, string name, ResourceFileType resourceFileType)
        {
            if (path == null)
                throw new ArgumentNullException("path");

            Path = path;
            Name = name;
            ResourceFileType = resourceFileType;
        }
    }
}
